<%@ page import="com.yinhai.core.common.api.config.impl.SysConfig"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<jsp:directive.page import="java.util.Date" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ taglib prefix="ta" tagdir="/WEB-INF/tags/tatags"%>

<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%">
<head>
<title>电子邮件配置</title>
</head>
<%@ include file="/ta/inc.jsp"%>
<body >
	<ta:pageloading />
		<ta:form id="form1" >
			<ta:panel id="pnl_frm" key="基本信息" >
				<ta:box cols="2" >
					<ta:text id="platformName" key="平台名称" required="true" columnWidth="0.8"/>
					<ta:box columnWidth="0.2" cssStyle="margin-left:20px" >
						<ta:checkboxgroup  >
							<ta:checkbox  id="defaultPlatform" value="dp" key="默认平台" />
						</ta:checkboxgroup>
					</ta:box>
				</ta:box>
				<ta:box cssStyle="margin:-5px 0px -5px 100px ;color:#7fb80e" height="25px">短信服务商的名称</ta:box>
				<ta:box cols="2" >
					<ta:text id="serverIp" key="平台服务器Ip" required="true" columnWidth="0.7"/>
					<ta:number id="serverPort" cssStyle="margin-left:-25px" key="端口" required="true" columnWidth="0.3"/>
				</ta:box>
				<ta:box cssStyle="margin:-5px 0px -5px 100px ;color:#7fb80e" height="25px">平台供接入的ip地址和端口</ta:box>
				<ta:text id="mainAccount" key="账号" required="true"/>
				<ta:box cssStyle="margin:-5px 0px -5px 100px ;color:#7fb80e" height="25px">您在此平台注册的账号</ta:box>
				<ta:text id="password" type="password" key="密码" required="true"/>
				<ta:box cssStyle="margin:-5px 0px -5px 100px ;color:#7fb80e" height="25px">账号对应的密码</ta:box>
				<ta:text id="appName" key="应用名称" required="true"/>
				<ta:box cssStyle="margin:-5px 0px -5px 100px ;color:#7fb80e" height="25px">您在该平台上配置的应用名称</ta:box>
			</ta:panel>
			<ta:buttonLayout cssStyle="margin-top:5px" >
				<ta:button id="btn_save" key="保存" hotKey="S" isok="true" onClick="save()"/>
				<ta:button id="btn_cancel" key="取消" hotKey="C" onClick="parent.Base.closeWindow('addconfigsms')" />
			</ta:buttonLayout>
		</ta:form>
</body>
</html>
<script type="text/javascript">
	$(document).ready(function() {
		$("body").taLayout();
	});
	
	/*保存数据*/
	function save(){
		Base.setDisabled("btn_save");
		Base.submit('form1','SmsConfigController!saveSmsConfig.do',null,null,null,function(){
			Base.submit("","SmsConfigController!queryAllSmsConfig.do");
			Base.confirm("新增成功,是否继续?",function(yes){
				if(yes){
					Base.setValue("platformName","");
					Base.setValue("serverIp","");
					Base.setValue("serverPort","");
					Base.setValue("mainAccount","");
					Base.setValue("password","");
					Base.setValue("appName","");
					Base.setEnable("btn_save");
				}
			});
		},function(){
			Base.setEnable("btn_save");
		});
	
	}
	
</script>
<%@ include file="/ta/incfooter.jsp"%>